package fr.lelouet.monitoring.snapshot.receivers;

import java.util.Properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import fr.lelouet.monitoring.snapshot.HVSnapshot;
import fr.lelouet.monitoring.snapshot.SnapshotReceiver;
import fr.lelouet.monitoring.snapshot.VMSnapshot;

/**
 * logs every snapshot to a dedicated slf4j logger.
 * 
 * @author guillaume
 * 
 */
public class LoggerReceiver implements SnapshotReceiver {

	private static final Logger logger = LoggerFactory
			.getLogger(LoggerReceiver.class);

	@Override
	public void configure(Properties prop) {
	}

	@Override
	public void hypervisorModification(HVSnapshot toShow) {
		logger.info("received HVSnapshot : {}", toShow);
	}

	@Override
	public void vmModification(VMSnapshot snapshot, HVSnapshot owner) {
		logger.info("received VMSnapshot : {}, owner : {}", snapshot, owner);
	}

}
